package com.szd.qiongyou20.home.search.presenter;

import com.szd.qiongyou20.home.search.bean.AskBean;
import com.szd.qiongyou20.home.search.modle.LoadSearchData;
import com.szd.qiongyou20.home.search.modle.SearchAskListener;
import com.szd.qiongyou20.home.search.modle.SearchData;
import com.szd.qiongyou20.home.search.view.AskDataToView;

/**
 * Created by SZD on 2016/12/26.
 */

public class AskPre {

    private SearchData mSearchData;
    private AskDataToView mAskDataToView;
//    private String keyword;

    public AskPre(AskDataToView askDataToView, String keyword) {
        mAskDataToView = askDataToView;
        mSearchData = new LoadSearchData(keyword);
    }

    public void loadDataToView(){
        mSearchData.searchAskData(new SearchAskListener() {
            @Override
            public void searchSuccess(AskBean askBean) {
                mAskDataToView.DataToView(askBean);
            }

            @Override
            public void searchFaile(String string) {

            }
        });
    }
}
